﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MLY.Bll
{
    public class ReportInfo
    {
        public ReportInfo() { }


        #region Static Methods
        // ======================================
        public static string AddReportInfo(ReportInfo reportInfo)
        {
            string sKey = Guid.NewGuid().ToString("D");
            HttpContext.Current.Session.Add(sKey, reportInfo);
            return sKey;
        }
        public static ReportInfo GetReportInfo(string ReportInfoKey)
        {
            if (HttpContext.Current.Session[ReportInfoKey] != null)
            {
                return (ReportInfo)HttpContext.Current.Session[ReportInfoKey];
            }
            else
            {
                return null;
            }
        }
        public static void RemoveReportInfo(string ReportInfoKey)
        {
            if (HttpContext.Current.Session[ReportInfoKey] != null)
            {
                HttpContext.Current.Session.Remove(ReportInfoKey);
            }
        }
        // ======================================
        #endregion

        #region Public Properties
        // ======================================
        public int ReportType { get; set; }
        public int OrganizationId { get; set; }
        public int SelectedOrganizationId { get; set; }
        public DateTime? DateFrom { get; set; }
        public DateTime? DateTill { get; set; }
        public string DateColumn { get; set; }
        public string ExpressionText { get; set; }
        public string ExpressionValue { get; set; }
        public string ExpressionLike { get; set; }

        // ======================================
        #endregion
    }

}
